package com.china08.yxyapi.repository.db;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.china08.yxyapi.entity.db.lessons.YxyLessonsSchoolLessonAuth;

public interface YxyLessonsSchoolLessonAuthRepository extends JpaRepository<YxyLessonsSchoolLessonAuth, String> {

    Integer countByUserId(String userId);

    List<YxyLessonsSchoolLessonAuth> findByLessonId(String lessonId);

    YxyLessonsSchoolLessonAuth findByLessonIdAndUserId(String lessonId, String userId);

    YxyLessonsSchoolLessonAuth findTop1ByUserIdOrderByCreatedDateDesc(String userId);

    List<YxyLessonsSchoolLessonAuth> findByUserIdAndStatus(String userId, Integer status);

    YxyLessonsSchoolLessonAuth findById(String catalogId2);

    YxyLessonsSchoolLessonAuth findByUserIdAndLessonIdAndSchoolIdAndStatus(String userId, String lessonId, String schoolId, int i);

    List<YxyLessonsSchoolLessonAuth> findByUserIdAndSchoolId(String userId, String schoolId);

    List<YxyLessonsSchoolLessonAuth> findByLessonIdAndSchoolId(String lessonId, String schoolId);

    List<YxyLessonsSchoolLessonAuth> findByLessonIdAndSchoolIdAndStatusAndUserIdIn(String lessonId, String schoolId, int i, List<String> studentList);

    List<YxyLessonsSchoolLessonAuth> findBySchoolIdAndLessonIdAndUserIdIn(String schoolId, String lessonId, List<String> studentList);

}
